from sys import argv
from os.path import exists

script, from_file, to_file = argv

print(f"拷贝文件从{from_file}到{to_file}")

# we could do these two on one line, how?
in_file = open(from_file)
indata = in_file.read()

print(f"所输入文件长度{len(indata)}")

print(f"输出文件是否存在？,{exists(to_file)}")
print("已准备好，敲REturn键继续，CTRL-C键放弃。")
input()

out_file = open(to_file,'w')
out_file.write(indata)

# 关闭文件
print("关闭文件")
out_file.close()
in_file.close()